<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<div class="span12 box-content">
	<div class="well"><h3>修改学生信息</h3>带<span style="color: red;" >*</span>为必填项目</div>
	<div class="span1"></div><div id="student_edit_alert_container" class="span4"></div><br/>
	<form class="form-horizontal span11" id="student_edit_form" >
		<input name="student_id"size="16" type="hidden" value="${student.id }">
		<div class="control-group">
			<label class="control-label">学号</label>
			<div class="controls">
				<input name="student_no"size="16" type="text" value="${student.no }">
				<span class="help-inline" style="color: red;">*</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">姓名</label>
			<div class="controls">
				<input name="student_name"size="16" type="text" value="${student.name}" >
				<span class="help-inline" style="color: red;">*</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">性别</label>
			<div class="controls">
				<select  name="gender">
					<option value="男" ${student.gender=="男"?"selected":"" }>男</option>
					<option value="女" ${student.gender=="女"?"selected":"" }>女</option>
				</select>
				<span class="help-inline" style="color: red;">*</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">年级</label>
			<div class="controls">
				<input name="student_grade"size="16" type="text" value="${student.grade }">
				<span class="help-inline" style="color: red;">*</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">QQ</label>
			<div class="controls">
				<input name="student_qq"size="16" type="text"value="${student.qq }">
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">电话</label>
			<div class="controls">
				<input name="student_tel"size="16" type="text"value="${student.telephone }">
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">所属学院</label>
			<div class="controls">
				<c:if test="${!user.superAdmin }">
					<c:set var="cglDisable" value="disabled"/>
				</c:if>
				<select  name="college"  ${cglDisable }>
					<c:forEach items="${colleges }" var="c" >
						<option value="${c.id }" ${c.id==stuClgId?"selected":"" }>${c.name }</option>
					</c:forEach>
				</select>
				<span class="help-inline" style="color: red;">*</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">所属系</label>
			<div class="controls">
				<select  name="department">
					<c:forEach items="${departments }" var="d" >
						<option value="${d.id }" ${d.id==stuDepId?"selected":"" }>${d.name }</option>
					</c:forEach>
				</select>
				<span class="help-inline" style="color: red;">*</span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">所属班级</label>
			<div class="controls">
				<select  name="classInfo">
					<c:forEach items="${classList }" var="c" >
						<option value="${c.id }" ${c.id==student.classInfo.id?"selected":"" }>${c.name }</option>
					</c:forEach>
				</select>
				<span class="help-inline" style="color: red;">*</span>
			</div>
		</div>
		<div class="form-actions">
			<button type="button" class="btn" onclick="history.go(-1)">取消并返回</button>
			<button type="button" class="btn btn-primary"id="student_edit_form_save">保存并返回</button>
			<button type="button" class="btn btn-warning"id="student_edit_form_resetPass" data-target="#student_reset_box" data-toggle="modal" >重置该学生密码</button>
		</div>
	</form>
</div>
<!-- 重置密码开始 -->
<div class="modal hide fade" id="student_reset_box">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal">×</button>
		<h3>重置密码</h3>
	</div>
	<div class="modal-body">
		<div id="student_reset_box_alert_container" ></div><br/>
		<label class="control-label" style="display: block;float: left; margin-top: 1%;">新密码:</label>
		<input name="newPass"size="16" type="text" style="margin-left: 3%;"/>
	</div>
	<div class="modal-footer">
		<a href="#" class="btn" data-dismiss="modal">取消</a>
		<a href="#" class="btn btn-warning" id="student_reset_form_save">保存</a>
	</div>
</div>
<!-- 重置密码 结束 -->